import java.util.*;
class Main
{
	
	int ans[];
	{
		ans = new int[301];
		int a=1, b=3;
		int addtion=3;
		ans[0] = 0;
		for (a=1; a<=300; a++){
			ans[a] = ans[a-1] + a*b;
			b += addtion++;			
		}
	}
	
	
	void output(int i, int a){
		System.out.printf("%d %d %d\n", i, a, ans[a]);
	}
	
	void go()
	{

        Scanner cin = new Scanner(System.in);
        int n, a;
        n = cin.nextInt();
        for (int i=1; i<=n; ++i)
        {
        	a = cin.nextInt();
        	output(i, a);      	
        }
        
	}

    public static void main(String args[])
    {
		new Main().go();
    }

}
